Optimal. Leaf size=160 \[ -\frac {a^5}{12 d (a-a \cos (c+d x))^3}-\frac {3 a^4}{8 d (a-a \cos (c+d x))^2}-\frac {23 a^3}{16 d (a-a \cos (c+d x))}+\frac {a^3}{16 d (a+a \cos (c+d x))}+\frac {9 a^2 \log (1-\cos (c+d x))}{4 d}-\frac {2 a^2 \log (\cos (c+d x))}{d}-\frac {a^2 \log (1+\cos (c+d x))}{4 d}+\frac {a^2 \sec (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3957, 2915, 12,
90} \begin {gather*} -\frac {a^5}{12 d (a-a \cos (c+d x))^3}-\frac {3 a^4}{8 d (a-a \cos (c+d x))^2}-\frac {23 a^3}{16 d (a-a \cos (c+d x))}+\frac {a^3}{16 d (a \cos (c+d x)+a)}+\frac {a^2 \sec (c+d x)}{d}+\frac {9 a^2 \log (1-\cos (c+d x))}{4 d}-\frac {2 a^2 \log (\cos (c+d x))}{d}-\frac {a^2 \log (\cos (c+d x)+1)}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 90
Rule 2915
Rule 3957
Rubi steps
\begin {align*} \int \csc ^7(c+d x) (a+a \sec (c+d x))^2 \, dx &=\int (-a-a \cos (c+d x))^2 \csc ^7(c+d x) \sec ^2(c+d x) \, dx\\ &=\frac {a^7 \text {Subst}\left (\int \frac {a^2}{(-a-x)^4 x^2 (-a+x)^2} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^9 \text {Subst}\left (\int \frac {1}{(-a-x)^4 x^2 (-a+x)^2} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^9 \text {Subst}\left (\int \left (\frac {1}{16 a^6 (a-x)^2}+\frac {1}{4 a^7 (a-x)}+\frac {1}{a^6 x^2}-\frac {2}{a^7 x}+\frac {1}{4 a^4 (a+x)^4}+\frac {3}{4 a^5 (a+x)^3}+\frac {23}{16 a^6 (a+x)^2}+\frac {9}{4 a^7 (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a^5}{12 d (a-a \cos (c+d x))^3}-\frac {3 a^4}{8 d (a-a \cos (c+d x))^2}-\frac {23 a^3}{16 d (a-a \cos (c+d x))}+\frac {a^3}{16 d (a+a \cos (c+d x))}+\frac {9 a^2 \log (1-\cos (c+d x))}{4 d}-\frac {2 a^2 \log (\cos (c+d x))}{d}-\frac {a^2 \log (1+\cos (c+d x))}{4 d}+\frac {a^2 \sec (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.88, size = 136, normalized size = 0.85 \begin {gather*} -\frac {a^2 (1+\cos (c+d x))^2 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \left (120 \csc ^2\left (\frac {1}{2} (c+d x)\right )+36 \csc ^4\left (\frac {1}{2} (c+d x)\right )+48 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+4 \log (\cos (c+d x))-9 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\csc ^6\left (\frac {1}{2} (c+d x)\right ) \left (16-3 \sec ^2\left (\frac {1}{2} (c+d x)\right ) (3+2 \sec (c+d x))\right )\right )}{384 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 85, normalized size = 0.53
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\sec \left (d x +c \right )-\frac {1}{12 \left (-1+\sec \left (d x +c \right )\right )^{3}}-\frac {5}{8 \left (-1+\sec \left (d x +c \right )\right )^{2}}-\frac {39}{16 \left (-1+\sec \left (d x +c \right )\right )}+\frac {9 \ln \left (-1+\sec \left (d x +c \right )\right )}{4}-\frac {1}{16 \left (1+\sec \left (d x +c \right )\right )}-\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{4}\right )}{d}\) | \(85\) |
default | \(\frac {a^{2} \left (\sec \left (d x +c \right )-\frac {1}{12 \left (-1+\sec \left (d x +c \right )\right )^{3}}-\frac {5}{8 \left (-1+\sec \left (d x +c \right )\right )^{2}}-\frac {39}{16 \left (-1+\sec \left (d x +c \right )\right )}+\frac {9 \ln \left (-1+\sec \left (d x +c \right )\right )}{4}-\frac {1}{16 \left (1+\sec \left (d x +c \right )\right )}-\frac {\ln \left (1+\sec \left (d x +c \right )\right )}{4}\right )}{d}\) | \(85\) |
norman | \(\frac {\frac {a^{2}}{96 d}+\frac {11 a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d}+\frac {13 a^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}+\frac {a^{2} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {95 a^{2} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {9 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(172\) |
risch | \(\frac {a^{2} \left (15 \,{\mathrm e}^{9 i \left (d x +c \right )}-48 \,{\mathrm e}^{8 i \left (d x +c \right )}+32 \,{\mathrm e}^{7 i \left (d x +c \right )}+40 \,{\mathrm e}^{6 i \left (d x +c \right )}-62 \,{\mathrm e}^{5 i \left (d x +c \right )}+40 \,{\mathrm e}^{4 i \left (d x +c \right )}+32 \,{\mathrm e}^{3 i \left (d x +c \right )}-48 \,{\mathrm e}^{2 i \left (d x +c \right )}+15 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{6} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}+\frac {9 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}-\frac {2 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(209\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 143, normalized size = 0.89 \begin {gather*} -\frac {3 \, a^{2} \log \left (\cos \left (d x + c\right ) + 1\right ) - 27 \, a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) + 24 \, a^{2} \log \left (\cos \left (d x + c\right )\right ) - \frac {2 \, {\left (15 \, a^{2} \cos \left (d x + c\right )^{4} - 24 \, a^{2} \cos \left (d x + c\right )^{3} - 7 \, a^{2} \cos \left (d x + c\right )^{2} + 23 \, a^{2} \cos \left (d x + c\right ) - 6 \, a^{2}\right )}}{\cos \left (d x + c\right )^{5} - 2 \, \cos \left (d x + c\right )^{4} + 2 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right )}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.71, size = 289, normalized size = 1.81 \begin {gather*} \frac {30 \, a^{2} \cos \left (d x + c\right )^{4} - 48 \, a^{2} \cos \left (d x + c\right )^{3} - 14 \, a^{2} \cos \left (d x + c\right )^{2} + 46 \, a^{2} \cos \left (d x + c\right ) - 12 \, a^{2} - 24 \, {\left (a^{2} \cos \left (d x + c\right )^{5} - 2 \, a^{2} \cos \left (d x + c\right )^{4} + 2 \, a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right )\right )} \log \left (-\cos \left (d x + c\right )\right ) - 3 \, {\left (a^{2} \cos \left (d x + c\right )^{5} - 2 \, a^{2} \cos \left (d x + c\right )^{4} + 2 \, a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 27 \, {\left (a^{2} \cos \left (d x + c\right )^{5} - 2 \, a^{2} \cos \left (d x + c\right )^{4} + 2 \, a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{12 \, {\left (d \cos \left (d x + c\right )^{5} - 2 \, d \cos \left (d x + c\right )^{4} + 2 \, d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.69, size = 238, normalized size = 1.49 \begin {gather*} \frac {216 \, a^{2} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 192 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) - \frac {3 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {{\left (a^{2} - \frac {12 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {90 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {396 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) - 1\right )}^{3}} + \frac {192 \, {\left (2 \, a^{2} + \frac {a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}}{\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1}}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 147, normalized size = 0.92 \begin {gather*} \frac {9\,a^2\,\ln \left (\cos \left (c+d\,x\right )-1\right )}{4\,d}-\frac {a^2\,\ln \left (\cos \left (c+d\,x\right )+1\right )}{4\,d}-\frac {2\,a^2\,\ln \left (\cos \left (c+d\,x\right )\right )}{d}+\frac {-\frac {5\,a^2\,{\cos \left (c+d\,x\right )}^4}{2}+4\,a^2\,{\cos \left (c+d\,x\right )}^3+\frac {7\,a^2\,{\cos \left (c+d\,x\right )}^2}{6}-\frac {23\,a^2\,\cos \left (c+d\,x\right )}{6}+a^2}{d\,\left (-{\cos \left (c+d\,x\right )}^5+2\,{\cos \left (c+d\,x\right )}^4-2\,{\cos \left (c+d\,x\right )}^2+\cos \left (c+d\,x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________